home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir39 / cmos16.zip / CMOS.OFS < prev    next >
Text File  |  1994-08-28  |  6KB  |  178 lines

  1. How CMOS is used
  2. ****************
  3.  
  4. !       = must be restored
  5. *       = checksummed
  6. v       = volatile
  7.  
  8. CMOS RAM map, PC/AT:
  9.     offset    contents
  10. v   00h     Seconds time of day
  11. v   01h     Seconds Alarm
  12. v   02h     Minutes time of day
  13. v   03h     Minutes Alarm
  14. v   04h     Hours time of day
  15. v   05h     Hours Alarm
  16. v   06h     Day of the Week
  17. v   07h     Day of the Month
  18. v   08h     Month
  19. v   09h     Year 1980 = 0
  20.     0Ah     Status Register A 
  21.                 bit 7 = updating time
  22.                 bit 6:4 = system clock divider
  23.                 bit 3:0 = periodic interrupt rate
  24. !   0Bh     Status Register B alarm
  25.         bit 7 = abort update cycle
  26.         bit 6 = enable periodic interrupt
  27.          bit 5 = enable alarm interrupt
  28.         bit 4 = enable update-ended interrupt
  29.         bit 3 = enable square wave generator
  30.         bit 2 = 1 = calendar in binary, 0 = bcd
  31.         bit 1 = 1 = 24 hour clock, 0 = 12 hour clock 
  32.              bit 0 = 1 enable daylight savings
  33. v   0Ch     Status Register C flags
  34.         bit 7 = interrupt active
  35.         bit 6 = periodic interrupt flag
  36.         bit 5 = alarm flag
  37.         bit 4 = update end flag
  38.         bit 3:0 = reserved
  39. !   0Dh     Status Register D battery
  40.         bit 7 = Real Time Clock has power
  41.         bit 6:0 = reserved
  42. !   0Eh     Diagnostic Status Byte
  43.         bit 7 = RTC lost power
  44.         bit 6 = CMOS checksum bad
  45.         bit 5 = invalid system config
  46.         bit 4 = invalid memory size
  47.         bit 3 = fixed disk adapter failure
  48.         bit 2 = invalid CMOS time
  49.         bit 1 = reserved
  50.         bit 0 = reserved
  51. !   0Fh     Shutdown Status Byte
  52. !*  10h     Disk Drive Type for Drives A: and B:
  53.         The drive-type bytes use bits 7:4 (most significant nibble)
  54.                 for the first floppy drive A: and 3:0 for B:
  55.         floppy drive types:
  56.         00h        no drive present
  57.         01h        360KB
  58.         02h        1.2MB
  59.         03h         720KB
  60.         04h         1.44MB
  61.         05h         2.88MB
  62.         03h-0Fh     reserved
  63. !*  11h     (AT):Reserved     (PS/2):drive type for hard disk C:
  64. !*  12h     
  65.         (AT, XT/286):hard disk type for drives C: and D:
  66.         bits 7:4 C: bits 3:0 D:
  67.                 (PS/2):drive type for hard disk D:
  68.         Format of drive-type entry for AT, XT/286:
  69.         0    number of cyls in drive (0-1023 allowed)
  70.         2    number of heads per drive (0-15 allowed)
  71.         3    starting reduced write compensation (not
  72.             used on AT)
  73.         5    starting cylinder for write compensation
  74.         7    max. ECC data burst length, XT only
  75.         8    control byte
  76.             Bit
  77.             7    disable disk-access retries
  78.             6    disable ECC retries
  79.             5-4  reserved, set to zero
  80.             3    more than 8 heads
  81.             2-0  drive option on XT (not used by AT)
  82.         9    timeout value for XT (not used by AT)
  83.            12    landing zone cylinder number
  84.            14    number of sectors per track (default 17,
  85.             0-17 allowed)
  86. !*  13h     Reserved
  87. !*  14h     Equipment Byte (corresponds to sw. 1 on PC and XT)
  88.         bits 7:6 - 00 = 1 floppy 01 = 2 floppies
  89.         bits 5:4 = 10 = colour 11 = mono
  90.         bit 1 = coprocessor present
  91.         bit 0 = 0 = floppies present
  92. !*  15h-16h    Base Memory Size in K      (low,high)
  93. !*  17h-18h    Expansion Memory Size in K (low,high)
  94. !*  19h         drive C: extended info
  95. !*  1Ah         drive D: extended info
  96. !*  1Bh-20h    Reserved
  97.         (PS/2) POS information Model 50 (60 and 80 use a 2k
  98.         CMOS RAM that is not accessible through software)
  99. !*  1Bh-1CH    AMI type 46 cyls
  100. !*  1Dh         AMI type 46 head count
  101. !*  1Eh-1Fh     AMI type 46 write precomp starting cyl
  102. !*  20h         AMI type 46 control byte
  103. !*  21h-22h     AMI type 46 landing zone cylinder
  104. !*  23h         AMI type 46 sectors per track
  105.  
  106. !*  24h-25H    AMI type 47 cyls
  107. !*  26h         AMI type 47 head count
  108. !*  27h-28h     AMI type 47 write precomp starting cyl
  109. !*  29h         AMI type 47 control byte
  110. !*  2Ah-2Bh     AMI type 47 landing zone cylinder
  111. !*  2Ch         AMI type 47 sectors per track
  112.  
  113. !*  21h-2Dh    Reserved (possibly checksumed)
  114. !*  2Eh-2Fh    Checksum of Bytes 10:20 or 10:2F  (low,high)
  115. !   30h-31h    Exp. Memory Size as Det. by POST (low,high)
  116. v   32h     Date Century Byte
  117. !   33h     Information Flags (set during power-on)
  118. !   34h-3Fh    Reserved
  119. !   40h-79h     Reserved for chipmaker
  120.  
  121.     4Ah         AST laptop backlight timeout in minutes
  122.     4Bh         AST laptop hard disk timeout in minutes
  123.     4Ch-52h     system password scan codes
  124.  
  125. !*  60h-61H    Phoenix type 48 cyls
  126. !*  62h         Phoenix type 48 head count
  127. !*  63h-64h     Phoenix type 48 write precomp starting cyl
  128. !*  65h-65h     Phoenix type 48 landing zone cylinder
  129. !*  67h         Phoenix type 48 sectors per track
  130.  
  131. !*  75h-76H    Phoenix type 49 cyls
  132. !*  77h         Phoenix type 49 head count
  133. !*  78h-79h     Phoenix type 49 write precomp starting cyl
  134. !*  7Ah-7Bh     Phoenix type 49 landing zone cylinder
  135. !*  7Ch         Phoenix type 49 sectors per track
  136.  
  137. Notes:
  138. ******
  139.  
  140. The alarm function is used to drive the BIOS WAIT function (int
  141. 15h function 90h).
  142.  
  143. To access the configuration RAM write the byte address (00-3Fh)
  144. you need to access to I/O port 70h, then access the data via I/O
  145. port 71h.
  146.  
  147. CMOS RAM chip is a Motorola 146818
  148.  
  149. The equipment byte is used to determine the configuration for
  150. the POST power-on diagnostics.
  151.  
  152. Bytes 00-0Dh are defined by the chip for timing functions, bytes
  153. 0Eh-3Fh are defined by IBM.
  154.  
  155. Compaq 386 uses came CMOS chip as IBM AT. Extra functions:
  156.     byte 45 (2Dh) store additional info not maintained by AT
  157.     bit 0 indicates is Compaq dual-mode monitor isntalled
  158.     1 indicates whether keyclick is enabled
  159.     2 not used
  160.     3 if non-Compaq graphics adapter installed
  161.  
  162. Some CMOSes, (SXs) appear to store duplicates of registers 0:3F
  163. in 40:7F, others (DXs) store some other advanced configuration
  164. information in these registers.  Thus there are 64 byte and 128
  165. byte CMOSes.  We tell them apart by looking for a match in bytes
  166. in the checksum range.
  167.  
  168. Offsets 10:2F are included in the checksum.  We do not ever
  169. need to compute a checksum in CMOSREST since we just save and
  170. restore.  Exactly what is included in the checksum varies with
  171. the BIOS.  Sometimes only 10:20 is included.
  172.  
  173. For further information see the IBM AT Technical reference page
  174. 1-56.  PC Magazine did an article on CMOS on page 344 of the
  175. September 13, 1994 edition.
  176.  
  177. -30-
  178.